<?php

namespace app\admin\model\wanlshop;

use app\admin\model\User;
use think\Model;
use traits\model\SoftDelete;

class OfflineOrder extends Model
{
    // 表名
    protected $name = 'wanlshop_offline_order';


    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }

    public function shop()
    {
        return $this->belongsTo(Shop::class, 'real_store_id', 'id');
    }

    public function order()
    {
        return $this->belongsTo(\app\api\model\wanlshop\Order::class, 'order_id');
    }

    public function getStatusList()
    {
        return ['0' => __('待支付'), '1' => __('支付成功'), '2' => __('支付失败')];
    }
}
